<% if(session[:user_id]==nil) %>
  <h4><%= t :dangnhapthuchien %></h4>
  <br/>
  <p><%= link_to "=> #{t :dangnhap}", login_path %></p>
<%else%>
<%= form_for(@category) do |f| %>
  <% if @category.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@category.errors.count, "error") %> prohibited this category from being saved:</h2>

      <ul>
      <% @category.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>
  
  <div class="field">
    <%= f.label "#{t :tentheloai}" %><br />
    <%= f.text_field :Name %>
  </div>
  <div class="field">
    <%= f.label "#{t :mota}" %><br />
    <%= f.text_field :Description %>
  </div>
  <div class="field">
    <%= f.label "#{t :hinhanh}" %><br />
    <%= f.text_field :Image %>
  </div>
  <div class="actions">
    <%= f.submit "#{t :xacnhan}"%>
  </div>
<% end %>
<%end%>